<?php
declare (strict_types=1);
namespace app\validate;

use think\Validate;

/**
 * 系统用户
 * Class User
 * @package app\validate
 * @date 2019-11-27
 */
class SysUser extends Validate
{
    //验证规则
    protected $rule = [
        'account'    => 'require|max:20',
        'userName'   => 'require|max:20',
        'idCard' => 'require|idCard',
        'deptId'      => 'require|number',
        'phone'     => 'require|mobile',
        'email'      => 'email',


    ];

    //提示信息
    protected $message = [
        'account.require'    => '请输入账户',
        'account.max'        => '账户号最多20个字符',
        'userName.require'   => '请输入真实姓名',
        'userName.max'       => '姓名最多20个字符',
        'idCard.require'     => '请输入身份证号',
        'idCard.idCard'      => '身份证号不符合格式',
        'deptId.require'     => '请输入部门编号',
        'deptId.number'      => '部门编号只能为数字',
        'phone.require'        => '请输入手机号',
        'phone.mobile'        => '手机格式错误',
    ];



}
